---
layout: docs
page_title: Nomad Enterprise Licensing
description: >-
  Learn how to configure, apply, and replace your Nomad Enterprise license. Use the `nomad license` command to review your license details.
---

# Nomad Enterprise Licensing

<EnterpriseAlert product="nomad"/>

This page provides information on how to configure, apply, inspect, and replace
your Nomad Enterprise license.

Each server in a Nomad Enterprise cluster must have a license to start. Download
Nomad Enterprise from the [releases site].

[Contact sales](https://www.hashicorp.com/go/nomad-enterprise) to set up a demo
of Nomad Enterprise.

Refer to the Enterprise license
[tutorial](/nomad/tutorials/enterprise/hashicorp-enterprise-license) for
step-by-step license instructions. Review the [Request a trial license section
](/nomad/tutorials/enterprise/hashicorp-enterprise-license#request-a-trial-license)
for instructions on how to get a trial license.

~> **Note:** A Nomad Enterprise cluster cannot be downgraded to the open
source version of Nomad. Servers running the open source version of Nomad will
panic if they are joined to a Nomad Enterprise cluster, due to raft entries
relating to Enterprise features not being parseable by open source Nomad.

## Expiring Licenses

Nomad Enterprise licenses have an expiration time.
You can read and validate the license on a running server,
on disk, or in your environment with the
[`nomad license` commands](/nomad/commands/license).

Before upgrading Nomad or replacing your license with a new one, you should always run
[`nomad license inspect`](/nomad/commands/license/inspect)
to ensure the license is valid with your server binary.

As a Nomad Enterprise license approaches its expiration time, Nomad servers
will periodically log a warning message about the approaching
expiration. Below shows log excerpts of the warnings.

```
    2021-03-29T15:02:28.100-0400 [WARN]  nomad.licensing: license expiring: time_left=5m0s
    2021-03-29T15:03:28.103-0400 [WARN]  nomad.licensing: license expiring: time_left=4m0s
    2021-03-29T15:04:28.106-0400 [WARN]  nomad.licensing: license expiring: time_left=3m0s
    2021-03-29T15:05:28.109-0400 [WARN]  nomad.licensing: license expiring: time_left=2m0s
    2021-03-29T15:06:28.112-0400 [WARN]  nomad.licensing: license expiring: time_left=1m0s
    2021-03-29T15:07:28.114-0400 [WARN]  nomad.licensing: license expiring: time_left=0s
    2021-03-29T15:07:58.104-0400 [ERROR] nomad.licensing: license expired, please update license: error="invalid license or license is expired"
```

When the license expires, enterprise functionality will become limited. Only
read operations on enterprise endpoints will be supported, and write
operations will return an error.

## Configuring the License

See the server [license configuration] reference documentation on all the
options to set an enterprise license. Nomad will load the license file from
disk or environment when it starts.

In order to immediately alert operators of a bad configuration setting, if a
license configuration option is an invalid or expired license, the Nomad server
will exit with an error.

```
NOMAD_LICENSE=misconfigured nomad agent -dev
==> No configuration files loaded
==> Starting Nomad agent...
==> Error starting agent: server setup failed: failed to initialize enterprise licensing: a file license was configured but the license is invalid: error decoding version: expected integer
```

See the [License commands](/nomad/commands/license) for more information on
interacting with the Enterprise License.

[releases site]: https://releases.hashicorp.com/nomad
[license configuration]: /nomad/docs/configuration/server#license_path
[license endpoint]: /nomad/api-docs/operator/license#updating-the-nomad-enterprise-license
